package com.cskaoyan.market.controller.wx;

import com.cskaoyan.market.service.MarketWXUserService;
import com.cskaoyan.market.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("wx/user")
public class WXUserController {
    @Autowired
    MarketWXUserService marketWXUserService;
    @GetMapping("index")
    public Object index(){
        Map<String, Object> order = marketWXUserService.getUserIndex();
        HashMap<String, Object> data = new HashMap<>();
        data.put("order", order);
        Object ok = ResponseUtil.ok(data);
        return ok;
    }
}
